<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html"/>

	<xsl:param name="username"/>
	<!--marius</xsl:param>-->

	<xsl:template match="/agenda">
		<xsl:apply-templates select="contact"/>
	</xsl:template>

	<xsl:template match="contact">
		<xsl:if test="@username=$username">
			<xsl:variable name="givenName" select="givenName"/>
			<xsl:variable name="middleName" select="middleName"/>
			<xsl:variable name="familyName" select="familyName"/>

			<xsl:variable name="divId">
				<xsl:text disable-output-escaping="yes">hcard</xsl:text>
				<xsl:text>-</xsl:text>
				<xsl:value-of select="$givenName"/>
				<xsl:if test="$middleName">
					<xsl:text>-</xsl:text>
					<xsl:value-of select="middleName"/>
				</xsl:if>
				<xsl:text>-</xsl:text>
				<xsl:value-of select="$familyName"/>
			</xsl:variable>

			<fieldset class='exportHcard' align='center'><legend>HCard</legend>
				<div id="{$divId}" class="vcard">
					<span class="fn n">
						<span class="given-name">
							<xsl:value-of select="$givenName"/><xsl:text> </xsl:text> 
						</span>  
						<xsl:if test="$middleName">
							<span class="additional-name">
								<xsl:value-of select="$middleName"/><xsl:text> </xsl:text>
							</span>
						</xsl:if>
						<span class="family-name">
							<xsl:value-of select="$familyName"/>
						</span>
					</span>

					<xsl:variable name="orgName" select="organization"/>
					<xsl:variable name="org">
						<xsl:if test="$orgName">
							<xsl:value-of select="$orgName"/>
						</xsl:if>
					</xsl:variable>
					<xsl:if test="$orgName">
						<div class="org">
							<xsl:value-of select="$org"/>
						</div>
					</xsl:if>

					<xsl:variable name="email" select="email"/>
					<a class="email" href="mailto:{$email}">
						<xsl:value-of select="$email"/>
					</a>

					<div class="adr">
						<div class="street-address">
							<xsl:value-of select="address/street"/>
						</div>
						<span class="locality">
							<xsl:value-of select="address/city"/><xsl:text> </xsl:text>
						</span>
						<span class="country-name">
							<xsl:value-of select="address/country"/>
						</span>
					</div>

					<xsl:variable name="telNr" select="phone"/>
					<xsl:variable name="phone">
						<xsl:if test="$telNr">
							<xsl:value-of select="$telNr"/>
						</xsl:if>
					</xsl:variable>
					<xsl:if test="$telNr">
						<div class="tel">
							<xsl:value-of select="$phone"/>
						</div>
					</xsl:if>
				</div>
			</fieldset>
				<xsl:variable name="hp" select="url"/>
				<xsl:variable name="url">
					<xsl:if test="$hp">
						<xsl:value-of select="$hp"/>
					</xsl:if>
				</xsl:variable>
				<xsl:if test="$hp">
					<div align="center">Home page: <xsl:value-of select="$url"/></div>
				</xsl:if>
		</xsl:if>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="..\..\xmlDb\agenda.xml" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->